package cn.itcast.bos.service.qp.impl;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cn.itcast.bos.dao.qp.WorkOrderManageDao;
import cn.itcast.bos.domain.qp.WorkOrderManage;
import cn.itcast.bos.service.qp.WorkOrderManageService;

@Service("workOrderManageService")
@Transactional
public class WorkOrderManageServiceImpl implements WorkOrderManageService {
	@Autowired
	private WorkOrderManageDao workOrderManageDao;

	public void save(WorkOrderManage model) {
		workOrderManageDao.save(model);
	}

	public Page<WorkOrderManage> findAll(Pageable pageRequest) {
		return workOrderManageDao.findAll(pageRequest);
	}

	//
	public void findAll(Map<String, Object> results, String conditionName, String conditionValue, Pageable pageRequest) {
		// 索引查询调用 dao 自己编写一个 接口实现类
		// spring data 如何使用自己实现类? 该方法调用自己实现类 pageQuery
		workOrderManageDao.pageQuery(results, conditionName, conditionValue, pageRequest);

	}

}
